package wangm.netty;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.Unpooled;
import io.netty.util.CharsetUtil;
import org.junit.Test;

import java.nio.CharBuffer;

/**
 * describe
 *
 * @author zk
 * @date 2018-02-05 11:18
 */
public class NettyTest {

    @Test
    public void booleanTest(){
        ByteBuf byteBuf = Unpooled.copiedBuffer(CharBuffer.allocate(10), CharsetUtil.UTF_8);
        System.out.println(byteBuf.getBoolean(0));
        System.out.println(byteBuf.getByte(0));
        System.out.println(byteBuf.getBoolean(1));
        System.out.println(byteBuf.getByte(1));
        byte b = 0;
        System.out.println(b);
    }
}
